<?php if (!defined('THINK_PATH')) exit();?><!doctype html>
<html>
<head>
    <meta charset="UTF-8">
    <title>blog后台管理</title>
    <link rel="stylesheet" type="text/css" href="/blog/Public/admin/css/common.css"/>
    <link rel="stylesheet" type="text/css" href="/blog/Public/admin/css/main.css"/>
    <script type="text/javascript" src="js/libs/modernizr.min.js"></script>
</head>
<body>
<div class="topbar-wrap white">
    <div class="topbar-inner clearfix">
        <div class="topbar-logo-wrap clearfix">
            <ul class="navbar-list clearfix">
                <li><a class="on" href="<?php echo U('admin/index/index');?>">首页</a></li>
                <li><a href="<?php echo U('home/index/index');?>" target="_blank">网站首页</a></li>
            </ul>
        </div>
        <div class="top-info-wrap">
            <ul class="top-info-list clearfix">
                <li><a href="">管理员</a></li>
                <li><a href="">修改密码</a></li>
                <li><a href="">退出</a></li>
            </ul>
        </div>
    </div>
</div>
<div class="container clearfix">
    <div class="sidebar-wrap">
        <div class="sidebar-title">
            <h1>菜单</h1>
        </div>
        <div class="sidebar-content">
            <ul class="sidebar-list">
                <li>
                    <a href=""><i class="icon-font">&#xe003;</i>常用操作</a>
                    <ul class="sub-menu">
                        <li><a href="<?php echo U('admin/design/index');?>"><i class="icon-font">&#xe008;</i>文章管理</a></li>
<!--                         <li><a href="<?php echo U('admin/omd/index');?>"><i class="icon-font">&#xe008;</i>玩家信息</a></li> -->
                    </ul>
                </li>
                <li>
                    <a href=""><i class="icon-font">&#xe018;</i>系统管理</a>
                    <ul class="sub-menu">
                        <li><a href=""><i class="icon-font">&#xe017;</i>系统设置</a></li>
                        <li><a href=""><i class="icon-font">&#xe037;</i>清理缓存</a></li>
                        <li><a href=""><i class="icon-font">&#xe046;</i>数据备份</a></li>
                        <li><a href=""><i class="icon-font">&#xe045;</i>数据还原</a></li>
                    </ul>
                </li>
            </ul>
        </div>
    </div>
    <!--/sidebar-->
    <div class="main-wrap">

        <div class="crumb-wrap">
            <div class="crumb-list"><i class="icon-font"></i><a href="<?php echo U('index/index');?>">首页</a><span class="crumb-step">&gt;</span><span class="crumb-name">文章管理</span></div>
        </div>
        <div class="result-wrap">
            <form name="myform" id="myform" method="post">
                <div class="result-title">
                    <div class="result-list">
                        <a href="<?php echo U('admin/insert/index');?>"><i class="icon-font"></i>新增文章</a>
                        <a id="batchDel" href=""><i class="icon-font"></i>批量删除</a>
                    </div>
                </div>
                <div class="result-content">
 <table class="result-tab" width="100%">
                        <tr>
                            <th class="tc" width="5%"><input class="all" type="checkbox"></th>
                            <th>ID</th>
                            <th>文章标题</th>
                            <th>文章作者</th>
                            <th>文章类型</th>
                            <th width="8%">点击率</th>
                            <th width="15%">文章创建时间</th>
                            <th width="8%">操作</th>
                        </tr>
                        <if >

                <?php if(empty($article)): ?><td align="center" colspan="8">暂无数据</td>
            </table>
            </div>
                    <?php else: ?> 
                        <?php if(is_array($article)): foreach($article as $key=>$article): ?><tr>
                            <td class="tc"><input name="id[]" value="<?php echo ($article["article_id"]); ?>" type="checkbox"></td>
                            <td align="center"><?php echo ($article["article_id"]); ?></td>
                            <td align="center"><?php echo ($article["article_title"]); ?></td>
                            <?php if($article[author_id] == 1): ?><td align="center">admin</td>
                                <?php else: ?>
                                <td align="center"><?php echo ($article["author_id"]); ?></td><?php endif; ?>
                            <?php if($article[article_type] == 0 ): ?><td align="center">博客文章</td>
                                <?php else: ?>
                            <td align="center">博客日记</td><?php endif; ?>
                            <td align="center"><?php echo ($article["article_click"]); ?></td>
                            <td align="center"><?php echo ($article["article_create_time"]); ?></td>
                            <td>
                                <a class="link-update" href="<?php echo U(updata, array(id=>$article[article_id]));?>">修改</a>
                                <a class="link-del" onclick="return confirm('你确定要删除该文章吗？')" href="<?php echo U(del, array(id=>$article[article_id]));?>">删除</a>
                            </td>
                        </tr><?php endforeach; endif; ?>
                    </table>
                    <div class="list-page"><?php echo ($page); ?></div>
                </div><?php endif; ?> 
    </form>
        </div>
    </div>
    <!--/main-->
</div>
</body>
</html>